package com.sikaryofficial.workbench.domain.mapping;

import com.sikaryofficial.workbench.domain.entity.GoodsMaterial;
import com.sikaryofficial.workbench.domain.vo.goods.GoodsMaterialVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 商品素材实体映射
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface GoodsMaterialMapping {
    GoodsMaterialMapping INSTANCE = Mappers.getMapper(GoodsMaterialMapping.class);

    /**
     * 实体映射VO
     *
     * @param relation
     * @return
     */
    GoodsMaterialVO coverToVO(GoodsMaterial relation);


    /**
     * 实体映射VO集合
     *
     * @param relation
     * @return
     */
    List<GoodsMaterialVO> coverToVOList(List<GoodsMaterial> relation);
}
